#include <vector>
#include <algorithm>
using namespace std;
class Solution
{
public:
    int findMinArrowShots(vector<vector<int>> &points)
    {
        if (points.empty())
        {
            return 0;
        }
        sort(points.begin(), points.end(), [](vector<int> a, vector<int> b) {
            return b[0] < a[0];
        });
        int size = points.size();
        int ans = 1, start = points[0][0];
        for (int i = 1; i < size; i++)
        {
            if (points[i][1] < start)
            {
                ans++;
                start = points[i][0];
            }
        }
        return ans;
    }
};
int main(int argc, char const *argv[])
{

    return 0;
}
